//
//  YDEventsController.m
//  YDBASE
//
//  Created by rowena on 2019/10/15.
//  Copyright © 2019 wuyezhiguhun. All rights reserved.
//

#import "YDEventsController.h"
#import "YDEventsRedView.h"
#import "YDEventsYellowView.h"
#import "YDEventsBlueView.h"

@interface YDEventsController ()

@property (nonatomic, strong) YDEventsRedView *eventsRedView;
@property (nonatomic, strong) YDEventsYellowView *eventsYellowView;
@property (nonatomic, strong) YDEventsBlueView *eventsBlueView;

@end

@implementation YDEventsController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.eventsRedView];
    [self.eventsRedView addSubview:self.eventsYellowView];
    [self.eventsYellowView addSubview:self.eventsBlueView];
    // Do any additional setup after loading the view.
}

- (YDEventsRedView *)eventsRedView {
    if (!_eventsRedView) {
        _eventsRedView = [[YDEventsRedView alloc] initWithFrame:CGRectMake(15, 130, 345, 345)];
    }
    return _eventsRedView;
}

- (YDEventsYellowView *)eventsYellowView {
    if (!_eventsYellowView) {
        _eventsYellowView = [[YDEventsYellowView alloc] initWithFrame:CGRectMake(50, 50, 245, 245)];
    }
    return _eventsYellowView;
}
- (YDEventsBlueView *)eventsBlueView {
    if (!_eventsBlueView) {
        _eventsBlueView = [[YDEventsBlueView alloc] initWithFrame:CGRectMake(50, 50, 145, 145)];
    }
    return _eventsBlueView;
}


@end
